home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group92c.txt
/
000069_icon-group-sender _Mon Nov 9 15:02:35 1992.msg
< prev
next >
Wrap
Internet Message Format
|
1993-01-04
|
2KB
Received: by cheltenham.cs.arizona.edu; Mon, 9 Nov 1992 18:50:54 MST
Date: Mon, 9 Nov 1992 15:02:35 MST
From: "Kenneth Walker" <kwalker>
Message-Id: <199211092202.AA25256@optima.cs.arizona.edu>
To: icon-group
Subject: Re: file scanning
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
> Date: 5 Nov 92 04:55:57 GMT
>
> Ken, Ralph, Clint, etc.: How hard would it really be to implement
> file scanning?
Kelvin Nilsen's Conicon has a stream data type the subsumes files and
supports a type of scanning. His scanning doesn't have tab() and move()
instead it has probe() and advance() which aslo replace read(). While
you can backtrack during scanning, I think there are limitations on
explicitly scanning backwards. He allows for infinite streams along the
lines of Unix pipes. I know he does some careful buffering to make
things work.
For files that support seek(), it should be possible to do scanning
with buffering as you suggested. It means that every file must be
buffered within the Icon run-time system and all string analysis
functions have to be changed to work on files and extend the buffer
when needed. Note that seeking backwards in a file using translation
mode on systems that have multi-character line termination (like
MS-DOS) may be a little tricky.
There is the question of where you put the buffer. Putting it in the
string region makes some string handling operations easier; portions
of the input are normal strings. However, it may be necessary to copy
the buffer to the end of the region to extent it. How do you decide how
much to copy? Suppose you backtrack past a point where you did a read-ahead
to extend the buffer; you probably don't want to loose the read-ahead.
How do you handle that? I haven't look closely at Kelvin's work in
several years, so I don't recall how he does these things. But it doesn't
sound trivial.
Ken Walker kwalker@cs.arizona.edu uunet!arizona!kwalker